current version 1.2 - 25th October 2024
version | date | comment |
---|---|---|
1.0 | 19/Jan/2024 | Original code |
1.1 | 25/Mar/2024 | added swe and soil balance terms |
1.2 | 25/Oct/2024 | added snow and ice melt and ice water equivalent |
license: GNU GPL http://www.gnu.org/licenses/
routines to compute average value of grid data over a given river basin Firstly variable is cumulated along the river network by following the flow direction. Then the cumulated value in a given point divided by the number of cell from the flow accumulation map is written to output file. The user provides a list of point coordinates that define the closing section of the river basins and set the variables to be processed in the configuration file like in the following example
# set the variables to export
# 1 activates export
# 0 suppresses export
# meteo
precipitation = 1
daily-precipitation = 0
temperature = 1
temperature-daily-mean = 0
temperature-daily-max = 0
temperature-daily-min = 0
relative-humidity = 0
solar-radiation = 0
net-radiation = 0
wind-speed = 0
irrigation = 0
#snow
snow-water-equivalent = 1
snow-melt = 1
#glaciers
ice-water-equivalent = 0
ice-melt = 0
#soil balance
soil-moisture = 1
delta-soil-moisture = 1
runoff = 1
infiltration = 1
percolation = 1
actual-ET = 1
potential-ET = 0
The value is computed for all variables marked by 1. When one variable is marked by 1 but it is not allocated because not computed by the FEST model according to options defined in the configuration files, value is not exported. For example, if user set to export wind-speed but windspeed is not used in the current simulation, values of windspeed are not written in the output file. One output file is created for each variable. So average temperature values for all points are written in a file, precipitation values are written in a different file, and so on.
Variables that can be exported, description, and unit are listed in the following table.
variable | Description | Unit |
---|---|---|
precipitation | Precipitation fallen in the current time step | mm |
daily-precipitation | Precipitation fallen in 24 hours | mm |
temperature | Air temperature of the current time step fallen in 24 hours | Celsius degree |
temperature-daily-mean | Mean daily air temperature | Celsius degree |
temperature-daily-max | Maximum daily air temperature | Celsius degree |
temperature-daily-min | Maximum daily air temperature | Celsius degree |
relative-humidity | Air relative humidity of the current time step | % (0-100) |
solar-radiation | Solar radiation of the current time step | w/m² |
net-radiation | Net radiation of the current time step | w/m² |
wind-speed | Wind speed of the current time step | m/s |
irrigation | Irrigation amount of the current time step | mm |
snow-water-equivalent | Snow water equivalent of the current time step | mm |
snow-melt | Snow melt of the current time step | mm |
ice-water-equivalent | Glaciers ice water equivalent of the current time step | mm |
ice-melt | Glaciers melt of the current time step | mm |
soil-moisture | Soil moisture of the current time step | - |
runoff | Runoff of the current time step | mm |
infiltration | Infiltration into soil of the current time step | mm |
percolation | Deep percolation out of transmission zone of the current time step | mm |
actual-ET | Actual evapotranspiration of the current time step | mm |
potential-ET | Potential evapotranspiration of the current time step | mm |
delta-soil-moisture | Change in soil water storage of the current time step | mm |
The name of output files is the concatenation of result
folder name defined in the main configuration file
variable | Output file name |
---|---|
precipitation | <folder> mean_precipitation.fts |
daily-precipitation | <folder> mean_pdaily.fts |
temperature | <folder> mean_temperature.fts |
temperature-daily-mean | <folder> mean_tmean.fts |
temperature-daily-max | <folder> mean_tmax.fts |
temperature-daily-min | <folder> mean_tmin.fts |
relative-humidity | <folder> mean_rh.fts |
solar-radiation | <folder> mean_rad.fts |
net-radiation | <folder> mean_netrad.fts |
wind-speed | <folder> mean_windspeed.fts |
irrigation | <folder> mean_irrigation.fts |
snow-water-equivalent | <folder> mean_swe.fts |
snow-melt | <folder> mean_snow-melt.fts |
ice-water-equivalent | <folder> mean_icewe.fts |
ice-melt | <folder> mean_ice-melt.fts |
soil-moisture | <folder> mean_soil-moisture.fts |
runoff | <folder> mean_runoff.fts |
infiltration | <folder> mean_infiltration.fts |
percolation | <folder> mean_percolation.fts |
actual-ET | <folder> mean_et.fts |
potential-ET | <folder> mean_pet.fts |
delta-soil-moisture | <folder> mean_delta-soil-moisture.fts |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=short), | public | :: | dtBasinAverage | ||||
integer(kind=short), | private | :: | countVar |
count number of variables active for output |
|||
type(grid_real), | private | :: | cum | ||||
integer(kind=short), | private | :: | fileUnitDSM | ||||
integer(kind=short), | private | :: | fileUnitET | ||||
integer(kind=short), | private | :: | fileUnitIWE | ||||
integer(kind=short), | private | :: | fileUnitIceMelt | ||||
integer(kind=short), | private | :: | fileUnitInfiltration | ||||
integer(kind=short), | private | :: | fileUnitIrrigation | ||||
integer(kind=short), | private | :: | fileUnitNetRadiation | ||||
integer(kind=short), | private | :: | fileUnitPET | ||||
integer(kind=short), | private | :: | fileUnitPercolation | ||||
integer(kind=short), | private | :: | fileUnitPrecipitation | ||||
integer(kind=short), | private | :: | fileUnitPrecipitationDaily | ||||
integer(kind=short), | private | :: | fileUnitRH | ||||
integer(kind=short), | private | :: | fileUnitRadiation | ||||
integer(kind=short), | private | :: | fileUnitRunoff | ||||
integer(kind=short), | private | :: | fileUnitSM | ||||
integer(kind=short), | private | :: | fileUnitSWE | ||||
integer(kind=short), | private | :: | fileUnitSnowMelt | ||||
integer(kind=short), | private | :: | fileUnitTemp | ||||
integer(kind=short), | private | :: | fileUnitTmax | ||||
integer(kind=short), | private | :: | fileUnitTmean | ||||
integer(kind=short), | private | :: | fileUnitTmin | ||||
integer(kind=short), | private | :: | fileUnitWindSpeed | ||||
type(ObservationalNetwork), | private | :: | sites | ||||
type(ObservationalNetwork), | private | :: | sitesDSM | ||||
type(ObservationalNetwork), | private | :: | sitesET | ||||
type(ObservationalNetwork), | private | :: | sitesIWE | ||||
type(ObservationalNetwork), | private | :: | sitesIceMelt | ||||
type(ObservationalNetwork), | private | :: | sitesInfiltration | ||||
type(ObservationalNetwork), | private | :: | sitesIrrigation | ||||
type(ObservationalNetwork), | private | :: | sitesNetRadiation | ||||
type(ObservationalNetwork), | private | :: | sitesPET | ||||
type(ObservationalNetwork), | private | :: | sitesPercolation | ||||
type(ObservationalNetwork), | private | :: | sitesPrecipitation | ||||
type(ObservationalNetwork), | private | :: | sitesPrecipitationDaily | ||||
type(ObservationalNetwork), | private | :: | sitesRH | ||||
type(ObservationalNetwork), | private | :: | sitesRadiation | ||||
type(ObservationalNetwork), | private | :: | sitesRunoff | ||||
type(ObservationalNetwork), | private | :: | sitesSM | ||||
type(ObservationalNetwork), | private | :: | sitesSWE | ||||
type(ObservationalNetwork), | private | :: | sitesSnowMelt | ||||
type(ObservationalNetwork), | private | :: | sitesTemp | ||||
type(ObservationalNetwork), | private | :: | sitesTmax | ||||
type(ObservationalNetwork), | private | :: | sitesTmean | ||||
type(ObservationalNetwork), | private | :: | sitesTmin | ||||
type(ObservationalNetwork), | private | :: | sitesWindSpeed | ||||
logical, | private | :: | varOut(22) |
Export basin averaged values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(DateTime), | intent(in) | :: | time | |||
type(grid_real), | intent(in) | :: | temp |
air temperarure (°C) |
||
type(grid_real), | intent(in) | :: | tmean |
air temperarure daily mean(°C) |
||
type(grid_real), | intent(in) | :: | tmax |
air temperarure daily max (°C) |
||
type(grid_real), | intent(in) | :: | tmin |
air temperarure daily min (°C) |
||
type(grid_real), | intent(in) | :: | precipitation |
precipitation rate (m/s) |
||
type(grid_real), | intent(in) | :: | rh |
air relative humidity (0-100) |
||
type(grid_real), | intent(in) | :: | radiation |
solar radiation (w/m2) |
||
type(grid_real), | intent(in) | :: | netradiation |
net radiation (w/m2) |
||
type(grid_real), | intent(in) | :: | windspeed |
wind speed (m/s) |
||
type(grid_real), | intent(in) | :: | daily_precipitation |
daily precipitation rate (m/s) |
||
type(grid_real), | intent(in) | :: | irrigation |
irrigation rate (m/s) |
||
type(grid_real), | intent(in) | :: | swe |
snow water equivalent (m) |
||
type(grid_real), | intent(in) | :: | sm |
soil mositure (-) |
||
type(grid_real), | intent(in) | :: | runoff |
runoff (m/s) |
||
type(grid_real), | intent(in) | :: | infiltration |
infiltration (m/s) |
||
type(grid_real), | intent(in) | :: | percolation |
deep percolation (m/s) |
||
type(grid_real), | intent(in) | :: | et |
actual evapotranspiration (m/s) |
||
type(grid_real), | intent(in) | :: | pet |
potential evapotranspiration (m/s) |
||
type(grid_real), | intent(in) | :: | dsm |
soil moisture variation (m) |
||
type(grid_real), | intent(in) | :: | snowmelt |
snow melt (m) |
||
type(grid_real), | intent(in) | :: | iwe |
ice water equivalent (m) |
||
type(grid_real), | intent(in) | :: | icemelt |
ice melt (m) |
Initialization of basin average
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | fileini | |||
character(len=*), | intent(in) | :: | pathout | |||
type(grid_real), | intent(in) | :: | temp |
air temperarure (°C) |
||
type(grid_real), | intent(in) | :: | tmean |
air temperarure daily mean(°C) |
||
type(grid_real), | intent(in) | :: | tmax |
air temperarure daily max (°C) |
||
type(grid_real), | intent(in) | :: | tmin |
air temperarure daily min (°C) |
||
type(grid_real), | intent(in) | :: | precipitation |
precipitation rate (m/s) |
||
type(grid_real), | intent(in) | :: | rh |
air relative humidity (0-100) |
||
type(grid_real), | intent(in) | :: | radiation |
solar radiation (w/m2) |
||
type(grid_real), | intent(in) | :: | netradiation |
net radiation (w/m2) |
||
type(grid_real), | intent(in) | :: | windspeed |
wind speed (m/s) |
||
type(grid_real), | intent(in) | :: | daily_precipitation |
daily precipitation rate (m/s) |
||
type(grid_real), | intent(in) | :: | irrigation |
irrigation rate (m/s) |
||
type(grid_real), | intent(in) | :: | swe |
snow water equivalent (m) |
||
type(grid_real), | intent(in) | :: | sm |
soil mositure (-) |
||
type(grid_real), | intent(in) | :: | runoff |
runoff (m/s) |
||
type(grid_real), | intent(in) | :: | infiltration |
infiltration (m/s) |
||
type(grid_real), | intent(in) | :: | percolation |
deep percolation (m/s) |
||
type(grid_real), | intent(in) | :: | et |
actual evapotranspiration (m/s) |
||
type(grid_real), | intent(in) | :: | pet |
potential evapotranspiration (m/s) |
||
type(grid_real), | intent(in) | :: | dsm |
soil moisture variation (m) |
||
type(grid_real), | intent(in) | :: | snowmelt |
snow melt (m) |
||
type(grid_real), | intent(in) | :: | iwe |
ice water equivalent (m) |
||
type(grid_real), | intent(in) | :: | icemelt |
ice melt (m) |
Read point file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string |
cumulate variable along stream network
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grid_real), | intent(in) | :: | var | |||
real(kind=float), | intent(in), | optional | :: | conv |
conversion factor |
delineate and export basin mask
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | pathout |